xen/arm: Introduce a generic way to describe device
authorJulien Grall <julien.grall@linaro.org>
Wed, 25 Feb 2015 18:52:55 +0000 (18:52 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 2 Mar 2015 13:55:23 +0000 (13:55 +0000)
commit6c5d3075d97ebe26661df063ee95b14168ad10f7
treed0ade0e0ed08063cb485424421240a684054b28a
parente00aa014c429d58d1dbcf9fed8edf477d0335133
xen/arm: Introduce a generic way to describe device

Currently, Xen is supporting PCI and Platform device (based on Device Tree).

While Xen only supports Platform device on ARM, Xen will gain support of
PCI soon.

Some drivers, such as IOMMU drivers, may handle PCI and platform device in
the same way. Only few lines of code differs.

Rather than requesting to provide 2 set of functions (one for PCI and
one for platform device), introduce a generic structure "device" which
is embedded in each specialized device.

As x86 only supports PCI, introduce a new type device_t which will be an
alias to pci_dev for this architecture. It will avoid to add a new field
for this place.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/device_tree.c
xen/include/asm-arm/device.h
xen/include/asm-x86/device.h [new file with mode: 0644]
xen/include/xen/device_tree.h
xen/include/xen/iommu.h
xen/include/xen/pci.h